"""
@name : client
@author : FanMY_71
@projectname: myflask
@Time: 2022/8/22-16:48
"""
from hashlib import md5
import requests
import time

appid = "apptest"
salt = "FandF"
secretkey = "123456"
timestamp = time.time()
print(timestamp)
user_sign = appid + salt + secretkey + str(timestamp)
m1 = md5()
m1.update(user_sign.encode(encoding="utf-8"))
sign = m1.hexdigest()

url = f"http://127.0.0.1:8000/v1/monitor?appid={appid}&salt={salt}&sign={sign}&timestamp={timestamp}"
#发送get请求

response = requests.get(url)
# url = "http://127.0.0.1:8000/v1/monitor"
# req = {"appid": appid, "salt": salt, "sign": sign}
# result = requests.get(url, params=req)
print(response.text)

